package hcn.protocol.brandnew.dengji.menzhenyuyue;

import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import lombok.Data;
import org.atag.sysrouter.annotation.DictionaryMapping;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;
import java.util.List;


/**
 * 门诊预约信息查询-响应消息(成功) - ODS_02040014_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class ListAppointmentWaitResponse {


    /**
     *
     */
    @XmlElement(name = "Total")
    private Long total;

    /**
     * 预约信息集
     */
    @XmlElementWrapper(name = "Appointments")
    @XmlElement(name = "Appointment")
    private List<Appointment> appointments;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class MedicalInsuranceCost {

        /**
         * 医保支付方式
         */
        @XmlElement(name = "MedicalInsuranceCostTypeCode")
        private Byte medicalInsuranceCostTypeCode;
        /**
         * 医保支付金额
         */
        @XmlElement(name = "MedicalInsuranceCost")
        private String medicalInsuranceCost;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Appointment {

        /**
         * 取消操作人
         */
        @XmlElement(name = "CancelOperator")
        private String cancelOperator;
        /**
         * 预约途经代码
         */
        @XmlElement(name = "AppointsRoute")
        private String appointsRoute;
        /**
         * 资源级别 1普通2专家
         */
        @XmlElement(name = "ResourceLevelCode")
        private String resourceLevelCode;
        /**
         * 医师排班类别
         */
        @DictionaryMapping("hcn.base.dictionary.HCN_outpatientSchedulingService")
        @XmlElement(name = "DoctorDutyType")
        private String doctorDutyType;
        /**
         * 患者性别
         */
        @XmlElement(name = "Sex")
        private String sex;


        /**
         * 取消时间
         */
        @XmlElement(name = "CancelDateTime")
        private String cancelDateTime;
        /**
         * 取消原因
         */
        @XmlElement(name = "RefundReason")
        private String refundReason;
        /**
         * 挂号操作人
         */
        @XmlElement(name = "RegisterOperator")
        private String registerOperator;


        /**
         * 患者卡号
         */
        @XmlElement(name = "MedicalCardId")
        private String medicalCardId;
        /**
         * 取号时间
         */
        @XmlElement(name = "RegisterTime")
        private Date registerTime;

        /**
         * 医疗机构组织机构代码
         */
        @XmlElement(name = "VisitOrganization")
        private String visitOrganization;
        /**
         * 医疗机构组织机构名称
         */
        @XmlElement(name = "VisitOrganizationName")
        private String visitOrganizationName;
        /**
         * 身份证件类别代码
         */
        @XmlElement(name = "IdCardCode")
        @DictionaryMapping(id = "CV02_01_101")
        private String idCardCode;
        /**
         * 身份证件号码
         */
        @XmlElement(name = "IdCard")
        private String idCard;
        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 患者卡号
         */
        @XmlElement(name = "MedicalCardID")
        private String medicalCardID;
        /**
         * 诊疗卡类型
         */
        @XmlElement(name = "MedicalCardType")
        private String medicalCardType;
        /**
         * 患者手机号码
         */
        @XmlElement(name = "PatientMobile")
        private String patientMobile;
        /**
         * 预约流水号
         */
        @XmlElement(name = "AppointsId")
        private String appointsId;

        /**
         * 预约ID
         */
        @XmlElement(name = "AppointmentId")
        private String appointmentId;

        /**
         * 资源ID
         */
        @XmlElement(name = "ResourcesId")
        private String resourcesId;
        /**
         * 系统预约日期时
         */
        @XmlElement(name = "SystemAppointmentDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date systemAppointmentDateTime;
        /**
         * 预约状态码
         */
        @XmlElement(name = "AppointmentStatus")
        private String appointmentStatus;
        /**
         * 出诊医生姓名
         */
        @XmlElement(name = "DoctorName")
        private String doctorName;
        /**
         * 出诊医生医护人员工号
         */
        @XmlElement(name = "DoctorCode")
        private String doctorCode;
        /**
         * 就诊日期时间
         */
        @XmlElement(name = "VisitDate")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date visitDate;
        /**
         * 资源时段结束日期时间
         */
        @XmlElement(name = "ResourceEndDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date resourceEndDateTime;
        /**
         * 资源时段开始日期时间
         */
        @XmlElement(name = "ResourceStartDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date resourceStartDateTime;
        /**
         * 挂号科室名称
         */
        @XmlElement(name = "DeptName")
        private String deptName;
        /**
         * 挂号科室代码
         */
        @XmlElement(name = "DeptCode")
        private String deptCode;
        /**
         * 预约顺序号
         */
        @XmlElement(name = "SerialNumber")
        private Short serialNumber;
        /**
         * 医生排班流水号（排班标识）
         */
        @XmlElement(name = "ScheduleMark")
        private String scheduleMark;
        /**
         * 就诊地址
         */
        @XmlElement(name = "AdmitAddress")
        private String admitAddress;
        /**
         * 费用终止日期时间
         */
        @XmlElement(name = "SettleEndDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date settleEndDateTime;
        /**
         * 取号凭证
         */
        @XmlElement(name = "Voucher")
        private String voucher;
        /**
         * 就诊原因
         */
        @XmlElement(name = "VisitReason")
        private String visitReason;
        /**
         * 签到标志
         */
        @XmlElement(name = "SignIn")
        private Byte signIn;
        /**
         * 支付状态
         */
        @XmlElement(name = "PayStatus")
        private String payStatus;
        /**
         * 发票号码
         */
        @XmlElement(name = "InvoiceCode")
        private String invoiceCode;
        /**
         * 挂号费
         */
        @XmlElement(name = "RegisteredCost")
        private String registeredCost;
        /**
         * 诊查费
         */
        @XmlElement(name = "ExaminationCost")
        private String examinationCost;
        /**
         * 专家费
         */
        @XmlElement(name = "DoctorCost")
        private String doctorCost;
        /**
         * 病历本费
         */
        @XmlElement(name = "BookCost")
        private String bookCost;
        /**
         * 就诊卡费
         */
        @XmlElement(name = "CardCost")
        private String cardCost;
        /**
         * 第三方交易流水号
         */
        @XmlElement(name = "AgtOrderNumber")
        private String agtOrderNumber;
        /**
         * 商户订单号
         */
        @XmlElement(name = "OutOrderNumber")
        private String outOrderNumber;
        /**
         * 聚合支付交易流水号
         */
        @XmlElement(name = "ChannelOrderNumber")
        private String channelOrderNumber;
        /**
         * 总计金额
         */
        @XmlElement(name = "TotalCost")
        private String totalCost;
        /**
         * 医疗付费方式代码
         */
        @XmlElement(name = "MedicalCostPayTypeCode")
        private String medicalCostPayTypeCode;
        /**
         * 自负金额
         */
        @XmlElement(name = "SelfCost")
        private String selfCost;
        /**
         * 结算日期时间
         */
        @XmlElement(name = "SettleDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date settleDateTime;
        /**
         * 业务系统患者档案ID
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;
        /**
         * 医保支付方式集合
         */
        @XmlElementWrapper(name = "MedicalInsuranceCosts")
        @XmlElement(name = "MedicalInsuranceCost")
        private List<MedicalInsuranceCost> medicalInsuranceCosts;
    }

}
